leg = int(input('请输入腿数：'))
head = int(input('请输入头数：'))
rabit = 0
chicken = head-rabit
if leg %2!= 0:
    print('请输入正确的腿数！')
else:
    while chicken * 2 + rabit < leg:
        rabit += 1
        chicken = head - rabit
    if chicken * 2 + rabit > leg:
        print('无解')
        break
    elif chicken * 2 + rabit < leg:
        print('无解')

    else :
        print('鸡：{}，兔：{}'.format(chicken,rabit))